1. Field of the Invention
This invention relates to a system and method for managing computer programs in a computer system, and more particularly to a system and method for using both shadow memory and cache memory to execute programs which the system stores in read only memory.
2. Description Of the Prior Art
In a personal computer system containing a 486 series microprocessor, the primary components include the following: dynamic random access memory (DRAM), one read-only memory (ROM) for storage of firmware (F/W), and a central processor unit (CPU) with cache RAM. The system memory address space is allocated as shown in FIG. 2. The first address space 27, consisting of the memory from address 0 to address Ar is implemented as dynamic random access memory (DRLM) and is therefore cacheable. A second address space 28, defined as the memory region from address A+1 to address B contains firmware 26, and is implemented as ROH which has been non-cacheable in the prior art. A third address space 29, defined as the memory region from address B+1 to address N, is also implemented as dynamic random access memory (DRAM), and is therefore also cacheable. The firmware 26 in the second address space 28 can be shadowed according to a conventional shadowing method 23 by copying it into an external DRAM used as a shadow memory device 22. The steps of the conventional shadowing method are as follows: (a) Copy the firmware 26 from the ROM at the second address space 28 into an external shadow memory device 22; (b) Control the hardware so that all accesses of the second address space 28 will be directed to the external shadow memory device 22, instead of the ROM; and (c) Put the shadow memory device 22 into a write-protect mode.
A drawback of the conventional technique is that the data in shadow memory device 22 cannot be further copied into another cache RAM 24 according to a cache RAM method 25 because there is no conventional technique for maintaining data consistency between the firmware 26 stored in both the shadow memory device 22 and the cache RAM 24.